/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Nguyen Hoang Minh
 */
class LoginTagLib {
  def loginTControl = {
    if(session.loginTailor){
      out << "Hello ${session.loginTailor.name} "
      out << """[${link(action:"logout", controller:"loginTailor"){"Logout"}}]"""
    } else {
      out << """[${link(action:"login", controller:"loginTailor"){"Login"}}]"""      
    }
  }
    
   def loginControl = {  
    if(session.loginAdmin){
      out << "Hello ${session.loginAdmin.name} "
      out << """[${link(action:"logout", controller:"loginAdmin"){"Logout"}}]"""
    } else {
      out << """[${link(action:"login", controller:"loginAdmin"){"Login"}}]"""      
    }
   }
    def loginCControl = {
     if(session.loginClient){
      out << "Hello ${session.loginClient.name} "
      out << """[${link(action:"logout", controller:"loginClient"){"Logout"}}]"""
    } else {
      out << """[${link(action:"login", controller:"loginClient"){"Login"}}]"""      
    }
           
    }
  }

